package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Student;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author lai
 * @data 2021/11/16
 * @apiNote
 */
public interface StudentMapper extends BaseMapper<Student> {

    // 根据班级查找同班学生

    @Select("SELECT * FROM `sys_student` WHERE class_id=#{classId}")
    List<Student> selectByClassId(Integer classId);

}
